<?php 

class Admin_Form_SearchOrder extends Custom_Form_Abstract{
	
	public function init(){
		
        $this->addElement('select', 'status', array(
            'decorators' => $this->elementDecorators,
            'label'       => 'Order Status',
        	'multiOptions'	=> Doctrine_Core::getTable('Doctrine_Model_Orders')->getEnumValues('status')
        ));
        
        $this->addElement('text', 'startDate', array(
        	'decorators' => $this->elementDecorators,
	        'required'   => false,
	        'validators'  => array (
	            array('date', false, array('mm/dd/yyyy'))
	        ),
	        'label'      => 'Start Date'
	    ));
	    
        $this->addElement('text', 'endDate', array(
        	'decorators' => $this->elementDecorators,
	        'required'   => false,
	        'validators'  => array (
	            array('date', false, array('mm/dd/yyyy'))
	        ),
	        'label'      => 'End Date'
	    ));
	    
	    $this->addElement('text', 'orderId', array(
            'decorators'	=>	$this->elementDecorators,
        	'label'		=>	'Order Id',
        	'required'   => false,
        ));
        
        $this->addElement('text', 'userId', array(
        	'decorators'	=>	$this->elementDecorators,
        	'label'		=>	'User Id',
        	'required'   => false,
        ));
        
        $this->addElement('text', 'userName', array(
        	'decorators'	=>	$this->elementDecorators,
        	'label'		=>	'Username',
        	'required'   => false,
        ));
        $this->addElement('text', 'firstName', array(
        	'decorators'	=>	$this->elementDecorators,
        	'label'		=>	'First Name',
        	'required'   => false,
        ));
        $this->addElement('text', 'lastName', array(
        	'decorators'	=>	$this->elementDecorators,
        	'label'		=>	'Last Name',
        	'required'   => false,
        ));
        
        $this->addElement('select', 'itemCountPerPage', array(
            'decorators' => $this->elementDecorators,
            'label'       => 'Items Per Page',
        	'multiOptions'	=> array(
        			10 => 10,
        			25 => 25,
        			50 => 50,
        			100 => 100,
        			250 => 250,
        			500 => 500,
        			1000 => 1000,
        	)
        ));
        
        $this->addElement('image', 'searchOrder', array(
        	'decorators' => $this->buttonDecorators,
        ));
	}
}